<!DOCTYPE html>
<html>

<head>

    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title></title>
    <meta name="keywords" content="">
    <meta name="description" content="">

    <link rel="shortcut icon" href="favicon.ico"> 
    <link href="__STATIC__/layout/css/bootstrap.min.css?v=3.3.6" rel="stylesheet">
    <link href="__STATIC__/layout/css/font-awesome.css?v=4.4.0" rel="stylesheet">
     <!-- jqgrid-->
    <link href="__STATIC__/layout/css/animate.css" rel="stylesheet">
    <link href="__STATIC__/layout/css/style.css?v=4.1.0" rel="stylesheet">
    <link href="__STATIC__/layout/css/gyq.css" rel="stylesheet">
    <link rel="stylesheet" href="__STATIC__/layout/css/demo.css" type="text/css">
      <script src="__STATIC__/layout/js/jquery.min.js?v=2.1.4"></script>
    <script src="__STATIC__/sc/js/page.js"></script> 
    <style>
       .checkbox-inline input[type=checkbox],.radio-inline input[type=radio] {
           margin-top: 4px;
      }
    </style>
</head>

<body style="color:#333;padding:3px;" class="x_sorll">
    <!-- 标题 -->
    <div class="page-heade">
      <h2 class="title_color text-center">支付明细列表</h2>
    </div>
    <!-- 标题 -->
    <div>
    <form action="#" method="post" class="form-inline formpage" id="form_check">
               <input type="hidden" value='{$page}' name="page" id="page-go"/>
                      <input type="hidden" value='{$list}' name="list" id="list-go"/>
                     
      <table class="row-margin-top tab-content table-bordered table text-left" border="1">
          <tr>
            <td style="min-width: 140px" class="text-right"><label for="" class="form-label">经销商编号：</label></td>
            <td><input type="text" class="form-control" name="jxs_no" value="{$data.jxs_no}"></td>
             <td style="min-width: 140px" class="text-right"><label for="" class="form-label">经销商名称：</label></td>
            <td><input type="text" class="form-control" name="jxs_name" value="{$data.jxs_name}"></td>
             <td style="min-width: 140px" class="text-right"><label for="" class="form-label">供应商编号：</label></td>
            <td><input type="text" class="form-control" name="gys_no" value="{$data.gys_no}"></td>
             <td style="min-width: 140px" class="text-right"><label for="" class="form-label">供应商名称：</label></td>
            <td><input type="text" class="form-control" name="gys_name" value="{$data.gys_name}"></td>
             </tr>
             <tr>
              <td style="min-width: 140px" class="text-right"><label for="" class="form-label">核销明细编号：</label></td>
            <td><input type="text" class="form-control" name="he_no" value="{$data.he_no}"></td>
             <td style="min-width: 140px" class="text-right"><label for="" class="form-label">原活动明细编号：</label></td>
            <td><input type="text" class="form-control" name="ap_no" value="{$data.ap_no}"></td>
             <td style="min-width: 140px" class="text-right"><label for="" class="form-label">支付类型：</label></td>
            <td>
              <select name="pay" id="" class="form-control">
                  <option value="0">请选择</option>
                  {volist name="pay" id="p"}
                    {if $p.id==$data.pay}
                      <option value="{$p.id}" selected="selected">{$p.title}</option>
                      {else/}
                       <option value="{$p.id}">{$p.title}</option>
                      {/if}
                  {/volist}
              </select>
            </td>
             <td style="min-width: 140px" class="text-right"><label for="" class="form-label">类型：</label></td>
            <td>
              <select name="type" id="" class="form-control">
                  <option value="0">请选择</option>
                  <option value="1" {if $data.type==1} selected {/if}>AP</option>
                  <option value="2" {if $data.type==2} selected {/if}>TI</option>
              </select>
            </td>
             </tr>
             <tr>
            
           
              <td style="min-width: 140px" class="text-right"><label for="" class="form-label">凭证号：</label></td>
            <td><input type="text" class="form-control" name="pinzheng" value="{$data.pinzheng}"></td>
              <td style="min-width: 140px" class="text-right"><label for="" class="form-label"> 支付日期：</label>
               </td>
                <td colspan="5">
               <div class="form-group">
               <input type="text" id="start" name="start" value="{$data.start}" class="form-control layer-date " style="min-width: 100px;width: 100px;display: inline-block;">
              </div>
               <div class="form-group">
                 -
               </div>
              <div class="form-group">
                <input type="text" class="form-control layer-date" style="min-width: 100px;width: 100px; display: inline-block;" id="end" name="end" value="{$data.end}">
               </div>
                </td>
             </tr>
          <tr>
             <td colspan="8" class="text-center">
              <button class="btn btn-info query" type="button" id="check">查询</button>
              <button class="btn btn-info emptyIf" type="button" id="clear_check">清空查询条件</button>
              <button class="btn btn-info LendExcel" type="button">导出Excel</button>
            </td>
          </tr>

      </table>
      
      <table class="table table-striped row-margin-top table-bordered table-hover text-center bud_hei">
          <tr class="info">
            <th class="text-center">序号</th>
            <th class="text-center">类型</th>
            <th class="text-center">核销明细编号</th>
            <th class="text-center">原活动明细编号</th>
            <th class="text-center">经销商编号</th>
            <th class="text-center">经销商名称</th>
            <th class="text-center">供应商编号</th>
            <th class="text-center">供应商名称</th>
            <th class="text-center">支付类型</th>
            <th class="text-center">支付日期</th>
            <th class="text-center">凭证号</th>
            <th class="text-center">支付方式</th>
            <th class="text-center">支付未税金额</th>
            <th class="text-center">支付税金</th>
            <th class="text-center">是否增值税</th>
            <th class="text-center">支付人</th>
          </tr>
          {volist name="apply" id="vo"}
            <tr>
              <td>{$i}</td>
              <td>{if $vo.type==1}AP{else/}TI{/if}</td>
              <td>{$vo.he_no}_{$vo.he_de_no}</td>
              <td>{$vo.ap_no}_{$vo.ap_de_no}</td>
              <td>{$vo.jxs_no}</td><td>{$vo.jxs_name}</td>
              <td>{$vo.gys_no}</td><td>{$vo.gys_name}</td>
              <td>支付</td><td>{$vo.zfday}</td><td>{$vo.pinzheng}</td><td>{$vo.zffs}</td>
              <td class="ObjectNum num2 weishui">{$vo.weishui}</td><td class="ObjectNum num2 shuijin">{$vo.shuijin}</td><td>{if $vo.dikou==1}是{else/}否{/if}</td><td>{$vo.em_name}</td>
            </tr>
          {/volist}
         
          <tr class="trTotal text-right">
            <td colspan="12">合计:</td>
            <td class="ObjectNum num2 zongweishui">20359.21</td>
            <td class="ObjectNum num2 zongshuijin">536.19</td>
           <td></td>
           <td></td>
          </tr>
      </table>
        <h5 class="text-center" id="pagesc" style="font-size: 16px;font-weight: 500">
            <script>
                            $(function(){
                                pageSC("pagesc",{$sum},{$page},{$maxpage})
                            })
                        </script>
             每页显示
           <select id="pagesize">
                        <option value='10' {if condition="$list eq 10"}selected{/if}>10条</option>
                        <option value='15'{if condition="$list eq 15"}selected{/if}>15条</option>
                        <option value='20'{if condition="$list eq 20"}selected{/if}>20条</option>

            </select>
        </h5>

</form>
    </div>
    <!-- 全局js -->
    <script src="__STATIC__/layout/js/bootstrap.min.js?v=3.3.6"></script>
    <!-- <script src="js/plugins/metisMenu/jquery.metisMenu.js"></script> -->
    <script src="__STATIC__/layout/js/plugins/slimscroll/jquery.slimscroll.min.js"></script>
    <!--统计代码，可删除-->
    <script src="__STATIC__/layout/js/plugins/layer/laydate/laydate.js"></script>
      <script src="__STATIC__/layout/js/common.js"></script>
    <script>
    $(".LendExcel").click(function(){
      window.open('{:url("daochuzf")}?datastr={$datastr}');
    })
        //日期范围限制
        var start = {
            elem: '#start',
            format: 'YYYY-MM-DD',
          
            max: '2099-06-16 23:59:59', //最大日期
            istime: true,
            istoday: false,
            choose: function (datas) {
                end.min = datas; //开始日选好后，重置结束日的最小日期
                end.start = datas //将结束日的初始值设定为开始日
            }
        };
        var end = {
            elem: '#end',
            format: 'YYYY-MM-DD',
            min: laydate.now(),
            max: '2099-06-16 23:59:59',
            istime: true,
            istoday: false,
            choose: function (datas) {
                start.max = datas; //结束日选好后，重置开始日的最大日期
            }
        };
        laydate(start);
        laydate(end);
          $(document).ready(function(){
            var weishui=0;
            $(".weishui").each(function(){
              weishui+=parseFloat($(this).html());
            })
            $(".zongweishui").html(weishui);
             var shuijin=0;
            $(".shuijin").each(function(){
              shuijin+=parseFloat($(this).html());
            })
            $(".zongshuijin").html(shuijin);
                 $(".num2").each(function(){
                  $(this).html(parseFloat($(this).html()).toFixed(2));
               })
            var $ObjectNum =$(".ObjectNum");
               toNum($ObjectNum);
          })

                       //翻页
       
        $("#check").click(function(){
              $("#page-go").val(1);
              $(".formpage").submit();
        })
        $("#clear_check").click(function(){
            $("input[type='text']").val("");
            $("select").val(0);
            $("#page-go").val(1);
            $(".formpage").submit();
        })
    </script>
</body>

</html>
